package org.example.flatmap;

import com.alibaba.fastjson.JSONObject;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Java8FlatMap4 {
    public static void main(String[] args) {
        String[][] array = new String[][]{{"a", "b"}, {"c", "d"}, {"e", "f"}};
        List<String> result = Stream.of(array)
                .flatMap(Stream::of)
                .filter(x -> !x.equals("a"))
                .collect(Collectors.toList());
        System.err.println(JSONObject.toJSONString(result));

    }
}
